<template>
    <div>
        
    <fengzhuangmodal :visible="visible" @on-cancel="cancel" @on-confirm="confirm"></fengzhuangmodal>
    <button @click="showModal">点击显示模态框</button>
    </div>
    
</template>
<script>
import fengzhuangmodal from "../fengzhuangmodel"
export default{
    components:{
        fengzhuangmodal
    },
    data(){
        return{
            visible:false
        }
    },
    methods:{
        showModal(){
          this.visible=true;
        },
        cancel(){
            this.visible=false
            alert('已取消')
        },
        confirm(){
            this.visible=false
            alert('提交成功')
        }
    }
}
</script>